package hottargui.domain.beta;

/**
 * @author Allan
 * 
 */

import hottargui.domain.*;


public class BetaAttackStrategyImpl implements AttackStrategy{

	public int attack(Tile ft,Tile tt, int dieValue, int attackCamels){
		int deadCamels = Math.round((dieValue + ft.getStrategicValue())/2);
		if (tt.getUnitCount() < deadCamels) {
			deadCamels = tt.getUnitCount(); 
		}
		return deadCamels;
	}

	public boolean defendAllowed(Tile tt, int deadDefenceCamels) {
		return (tt.getUnitCount() - deadDefenceCamels > 0);
	}

	public boolean rollDieAllowed() {
		return true;
	}
}

